package com.example.e_comm.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;


@Data
@TableName("permissions")
public class Permission {
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getPermName() {
        return permName;
    }

    public void setPermName(String permName) {
        this.permName = permName;
    }

    public String getPermKey() {
        return permKey;
    }

    public void setPermKey(String permKey) {
        this.permKey = permKey;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @TableId(type = IdType.AUTO)
    private long id;
    @TableField(value = "perm_name")
    private String permName; //权限名称：例如：READ-读取权限
    @TableField(value = "perm_key")
    private String permKey;//权限校验
    @TableLogic(value = "0",delval = "1")
    private Integer deleted;//0：1：
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime= LocalDateTime.now();
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime = LocalDateTime.now();
}
